<!--
 * @Author: your name
 * @Date: 2021-10-26 20:52:46
 * @LastEditTime: 2021-10-26 21:15:09
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \bigdate\src\views\admin\componentsPage\verify.vue
-->
<template>
    <div class="inputs">
        <div class="inputs_con">
            <Card>
                <div class="inputs_con_title">输入框</div>
                <div class="inputs_con_cell">
                    <V-input title="昵称" @onInput="onInput1"></V-input>
                </div>
                <div class="inputs_con_cell">
                    <V-input title="邮箱" @onInput="onInput2"></V-input>
                </div>
                <div class="inputs_con_cell">
                    <V-input title="手机号" @onInput="onInput3"></V-input>
                </div>
                <div class="inputs_con_cell">
                    <V-input title="名称" @onInput="onInput4"></V-input>
                </div>
                <div class="text">打印结果见控制台</div>
            </Card>
        </div>
    </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'
import { useMassage } from '@/ntils/hooks'
import VInput from '@/components/inputs/index.vue'
import { Card, Button } from 'ant-design-vue'

export default defineComponent({
    name: 'Varify',
    components: {
        VInput,
        Card,
        Button,
    },
    setup() {
        let { createMessage } = useMassage()
        const Verify = ref()
        const onSuccess = (e) => {
            createMessage.success('验证成功！')
        }
        const onReload = () => {
            Verify.value?.reload()
        }
        const onInput1 = (e) => {
            console.log(e)
        }
        const onInput2 = (e) => {
            console.log(e)
        }
        const onInput3 = (e) => {
            console.log(e)
        }
        const onInput4 = (e) => {
            console.log(e)
        }
        return {
            onSuccess,
            onReload,
            Verify,
            onInput1,
            onInput2,
            onInput3,
            onInput4,
        }
    },
})
</script>

<style lang="less" scoped>
.inputs {
  width: 100%;
  .text {
    text-align: center;
    margin-top: 0.5rem;
  }
  &_con {
    &_title {
      text-align: center;
      margin: 2rem 0;
    }
    &_cell {
      margin-top: 2rem;
    }
    width: 400px;
    margin: 5rem auto;
    .card_cell {
      margin: 3rem 0;
      text-align: center;
    }
  }
}
</style>
